
#ifndef __MATERIAL_EDITOR_H
#define __MATERIAL_EDITOR_H

#include "OyEngineHeader\OyGeneral.h"		// Commom Lib
#include "OyEngineHeader\OyMath3D.h"		// Math Lib
#include "OyEngineHeader\OyRenderer.h"		// our render interface

#include "../JuceLibraryCode/JuceHeader.h"

struct CMaterialComboxContex
{
	String	m_stringName;
	DWORD	m_currentType;
	DWORD	m_currentValue;
	DWORD	m_defaultValue;
	String	m_ComboxString[20];
	DWORD	m_ComboxValue[20];
};

extern void SetCustomMaterialStr();
extern void InitMaterialProperties();

extern String				g_currentTabName;
extern int					g_customMaterialID;
extern String				g_customMaterialStr;
extern char					g_SourceCodeStr[10240];

extern Colour				g_EditorBKColor;
extern Colour				g_DefaultColor[24];
extern LPOYRENDERER			g_pRenderer; 
extern LPOYRENDERDEVICE		g_pDevice;   
extern OyTimer*				g_pTimer;
extern float				g_Aspect;
extern UINT					g_DefaultSkin;
extern UINT					g_DefaultMaterialID;
extern UINT					g_DefaultModifierID;
extern UINT					g_GuidSB;
extern UINT					g_AxisSB;



extern TCHAR				g_DiffuseTexPath[256];
extern TCHAR				g_NormalTexPath[256];

extern CMaterialComboxContex	g_TextureSampleContex[13];
extern DWORD					g_TexSampleState[2][13];
extern Colour					g_TexSampleBorderColor[2];
extern bool						g_BooleanLighting;
extern CMaterialComboxContex	g_CullModeContex;
extern bool						g_BooleanDepthTest;
extern bool						g_BooleanDepthWrite;
extern bool						g_BooleanZFuncGreater;
extern float					g_DepthBias;
extern bool						g_BooleanVertexColor;
extern bool						g_BooleanSpecular;
extern bool						g_BooleanLineMode;
extern CMaterialComboxContex	g_ColorWriteContex;
extern bool						g_BooleanFogEnable;
extern Colour					g_TextureFactorColor;

extern bool						g_BooleanAlphaBlend;
extern CMaterialComboxContex	g_AlphaBlendOp;
extern CMaterialComboxContex	g_AlphaBlendSrc;
extern CMaterialComboxContex	g_AlphaBlendDest;
extern bool						g_BooleanSeparateAlphaBlend;
extern CMaterialComboxContex	g_AlphaBlendOpAlpha;
extern CMaterialComboxContex	g_AlphaBlendSrcAlpha;
extern CMaterialComboxContex	g_AlphaBlendDestAlpha;

extern bool						g_BooleanAlphaTest;
extern CMaterialComboxContex	g_AlphaTestFunc;
extern DWORD					g_AlphaTestRef;

extern CMaterialComboxContex	g_TextureStageStateContex[2][30];
extern DWORD					g_TextureStageState[2][30];
#endif